{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "trying-coaching",
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "c:\\users\\isenc\\appdata\\local\\programs\\python\\python38\\lib\\site-packages\\pandas\\core\\indexing.py:1676: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame.\n",
      "Try using .loc[row_indexer,col_indexer] = value instead\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  self._setitem_single_column(ilocs[0], value, pi)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "There was no error!\n",
      "输出成功，请打开 test.xlsx 查看输出结果\n"
     ]
    }
   ],
   "source": [
    "\n",
    "\n",
    "# 1. 建交互控制台\n",
    "from yolib.convertter import pattern_copier\n",
    "copier = pattern_copier()\n",
    "# 2. 请求读取数据\n",
    "copier.read_data(data_file=r'.\\data\\庆合废钢6-26.xlsx', idx='明细公', factory_name='大冶华鑫', receipt='出仓单')\n",
    "\n",
    "# 11. 请求读取模板\n",
    "copier.read_pattern(r'.\\data\\出入库单模板.xlsx',1)\n",
    "\n",
    "copier.tidy_data['保管员'] = '小梅'\n",
    "copier.oto_loc.update({'F13': '保管员'})\n",
    "\n",
    "# 15. 请求写入sheet\n",
    "copier.write_in_sheet(gap_between_blocks_in_a_page=0,number_of_blocks_per_page=1)\n",
    "\n",
    "# 19. sheet 页面设置\n",
    "copier.page_setup(margins=copier.NARROWER,paperSize='0',scale=100,)\n",
    "\n",
    "# 21. 输出结果\n",
    "copier.output('test.xlsx')\n",
    "\n",
    "\n",
    "\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "embedded-preference",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "assured-space",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
